<?php
session_start();
if(isset($_SESSION["user"])){
include_once("../Classes/Funcionario.php");
include_once("../Classes/Pagina.php");
//variavel que printa o texto de todos os select da pagina
$text = "Selecionar";
$pagina = new Pagina();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script src="jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script src="javascript/jquery.click-calendario-1.0.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/jquery.click-calendario-1.0.css" type="text/css" />

<script language="javascript">
$(document).ready(function(){
$("#txtCentroCusto").mask("9999");

});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="tudoBuscaDemanda">
<div id="Busca">
<table id="parametrosBusca" width="580" border="0">
  <tr>
    <td colspan="2"><p class="tituloCadastro">Busca</p></td>
  </tr>
  <tr>
    <td>Número</td>
    <td><input id="txtNumero" name="txtNumero" value="" type="text" /></td>
    <td>Centro de Custo: 
    </td>
    <td><input type="text" id="txtCentroCusto" size="10" />
    </td>
  </tr>
  <tr>
    <td>Area Responsabilidade:</td>
    <td><select id="txtAreaResponsabilidade" name="txtAreaResponsabilidade">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
		<?php 
		Pagina::selectAreaResp();
 	?></select></td>
    <td>TipoDocumento: 
    </td>
    <td><select id="txtTipoDocumento" name="txtTipoDocumento">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
		<?php 
		Pagina::selectTipoDocumentoDesc();
 	?></select>
    </td>
  </tr>
  <tr>
    <td>Tipo Entrega:</td>
    <td><select id="txtTipoEntrega" name="txtTipoNota">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
   		<?php 
		Pagina::selectTipoEntregaDesc();
	?> </select></td>
    <td>
	Técnico:    
    </td>
    <td>
    <select id="txtTecnico" name="txtTecnico">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
   		<?php 
		$pagina->selectTecnico(1);
	?> </select>
    </td>

  </tr>
   <tr>
    <td>Tipo de Serviço:</td>
    <td><select id="txtTipoNota" name="txtTipoNota">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
		<?php 
		Pagina::selectTipoNotaSigla();
	?> </select></td>
    <td>Situação:</td>
    <td><select id="txtSituacao" name="txtTipoNota">
    	<option selected="selected" value="0" ><?php echo $text ?></option>
   		<?php 
		Pagina::selectSituacaoDesc();
	?> </select></td>
  </tr>
  <tr>
    <td>Data início: 
    </td>
    <td><input type="text" id="txtDataInicio" name="txtDataInicio" maxlength="10" size="10" /></td>
    <td>Data fim:</td>
    <td><input type="text" id="txtDataFim" name="txtDataFim" maxlength="10" size="10" /></td>
  </tr>
  <tr>
  <td><input type="button" id="buscarDemandas" value="Buscar" />
  </td>
  </tr>
</table>

</div>
<div id="resultado">
<?php

if(isset($_SESSION["voltar"]) && !isset($_GET["caminho"])){
    include_once '../paginas/resultado.busca.demanda.php';
}

?>
</div>
</div>
</body>
</html>
<?php }
?>